-- GENERATED SPELL FOR [Wushoolay] --


function spell0_15085(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(24680,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15085', 1500, 1)
end

function spell1_15085(pUnit, Event) --@Forked Lightning,n/a--
pUnit:FullCastSpellOnTarget(24682,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15085', 538, 1)
end

function spell2_15085(pUnit, Event) --@Lightning Cloud,n/a--
pUnit:FullCastSpellOnTarget(24683,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15085', 15000, 1)
end

function Sorts_15085(pUnit, Event)
local choix_sorts_15085 = math.random(0, 2)
if choix_sorts_15085 == 0 then
pUnit:RegisterEvent('spell0_15085', 1, 1)
end
if choix_sorts_15085 == 1 then
pUnit:RegisterEvent('spell1_15085', 1, 1)
end
if choix_sorts_15085 == 2 then
pUnit:RegisterEvent('spell2_15085', 1, 1)
end
end

function mob15085_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15085', math.random(1500, 3000), 1)
end

function mob15085_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15085_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15085_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15085, 1, 'mob15085_Action')
RegisterUnitEvent(15085, 2, 'mob15085_Leave')
RegisterUnitEvent(15085, 3, 'mob15085_Kill')
RegisterUnitEvent(15085, 4, 'mob15085_Die')
